package com.spirngboot.middleware.middleware_rabbitmq.server.service.direct;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = {"short_message.direct.queue"})
public class ShortMessageDirectConsumer {
    private static final Logger log = LoggerFactory.getLogger(ShortMessageDirectConsumer.class);

    @RabbitHandler
    public void receiveMessage(String message) {
        //省略短信业务逻辑
        log.info("{}接收到订单信息:{}", log.getName(), message);
    }
}
